New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

abaabil.inputgroup

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abaabil.inputgroup

  • 0.1.2
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

Input Component

The Input component is a versatile and accessible input element designed for React applications. It supports various input types, icons, prefixes, and suffixes, making it ideal for forms and user input sections in your app.

Installation

To use the Input component, first install the package from npm:

npm install abaabil.input

Importing

You can import the Input component directly from the abaabil.input package:

import Input from 'abaabil.input';

Alternatively, you can import it from the main abaabil package:

import { Input } from 'abaabil';

Usage

Here's a basic example of how to use the Input component:

<Input
  id="example-input"
  label="Example Label"
  leadingIcon="photo"
  trailingIcon="photo"
  placeholder="Type here..."
/>

Input Types

The Input component supports various input types, allowing for flexibility in different scenarios:

<div className="space-y-4">
  <Input id="text-input" label="Text Input" placeholder="Type here..." />
  <Input id="password-input" label="Password Input" type="password" placeholder="Password" />
  <Input id="email-input" label="Email Input" type="email" placeholder="Email" />
  <Input id="search-input" label="Search Input" type="search" placeholder="Search" />
  <Input id="number-input" label="Number Input" type="number" placeholder="Number" />
  <Input id="date-input" label="Date Picker" type="date" />
  <Input id="time-input" label="Time Picker" type="time" />
  <Input id="datetime-input" label="Date-Time Picker" type="datetime-local" />
</div>

Props

The Input component accepts the following props:

Prop NameTypeDescription
idstringThe unique identifier for the input field.
labelstringThe label for the input field.
typestringThe type of input field (e.g., text, password, email, number, etc.).
valuestringThe value of the input field.
placeholderstringThe placeholder text for the input field.
leadingIconstringTabler icon ID to display at the start of the input field.
trailingIconstringTabler icon ID to display at the end of the input field.
prefixnodeContent to display before the input field, such as an icon or text.
suffixnodeContent to display after the input field, such as an icon or text.
containerClassNamestringAdditional CSS classes to apply to the outer container.
labelWrapperClassNamestringAdditional CSS classes to apply to the label element.
prefixAndSuffixClassNamestringAdditional CSS classes to apply to both the prefix and suffix elements.
inputElementClassNamestringAdditional CSS classes to apply to the input element itself.
disabledboolWhether the input field is disabled.
ariaLabelstringDefines a string value that labels the input field.
ariaDescribedBystringIdentifies the element that describes the input field.
ariaRequiredboolIndicates whether the input field is required.
onChangefunctionCallback function that triggers when the input value changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

We welcome contributions to improve this component. Please submit a pull request or raise an issue to discuss any changes.

Acknowledgments

Thanks to everyone who contributed to the development of this component.

Keywords

FAQs

Package last updated on 16 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc